<?php

namespace goosh;

class ini

{
  protected static
    $ini;
    
  public function __construct()
  
  {
    self::$ini=parse_ini_file(goosh_base.'/goosh.ini');
  }
  
  public function get($key)
  
  {
    if(isset(self::$ini[$key]))
    return self::$ini[$key];
  }
  
  public function set($key,$value)
  
  {
    switch($key)
    
    {
      default:
      
        return;
      
      break;
    
      case'api':
      
        self::$ini['api']=$value;
        self::$ini['switch']=time();
      
      break;
    }
  }
}
